package com.neugh;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class UploadConfig extends WebMvcConfigurerAdapter {

    /**
     * 不用刷新项目
     * @param registry
     */

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
//映射图片保存地址
        registry.addResourceHandler("/img/**").addResourceLocations("file:D:\\ider\\cangku\\neughlinlibang\\Neugh\\itcy\\src\\main\\resources\\static\\img\\");
    }

}